refactor: Update workspace new to produce logs describing when a workspace has been created but failed to populate its state - #39192
Open
SarahFrench wants to merge 2 commits into
Conversation
SarahFrench
changed the base branch from
main
to
refactor-workspace-new-use-views
September 11, 2026 14:10
SarahFrench
force-pushed
the
refactor-workspace-new-use-views
branch
from
September 11, 2026 14:14
aa3cc9d to
24901e9
Compare
SarahFrench
force-pushed
the
refactor-workspace-new-log-failure-to-populate-state
branch
from
September 11, 2026 14:14
35b9f34 to
aad4b94
Compare
SarahFrench
force-pushed
the
refactor-workspace-new-use-views
branch
3 times, most recently
from
October 1, 2026 16:30
dd77deb to
cf77dff
Compare
2 of 3 tasks
SarahFrench
force-pushed
the
refactor-workspace-new-log-failure-to-populate-state
branch
from
October 1, 2026 16:40
aad4b94 to
953ad2b
Compare
Member
Author
|
Rebased as the base branch has changed |
…ts state wasn't updated as expected
…created workspace
SarahFrench
force-pushed
the
refactor-workspace-new-log-failure-to-populate-state
branch
from
October 2, 2026 14:27
953ad2b to
1bd9a2d
Compare
SarahFrench
commented
Oct 2, 2026
| return 1 | ||
| } | ||
|
|
||
| view.LogWorkspaceCreationSuccess(workspace, diags) |
Member
Author
There was a problem hiding this comment.
This output doesn't explicitly communicate 'we created a workspace and we used the -state flag as you expected', but I think that's fine. The more important thing is only reporting success alongside returning 0.
SarahFrench
marked this pull request as ready for review
October 2, 2026 14:35
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is intended to prevent a scenario where the
workspace newcommand logs a success message after creating an empty workspace but then logs additional errors that show the-stateflag wasn't able to be used successfully.Instead, the success message should only be logged in scenarios where we return
0.If a workspace is created but the
-stateflag cannot be used successfully then the command has had side-effects when failing. These changes let the user know that their intended outcome wasn't reached and gives some input on how to proceed.Target Release
1.18.x
Rollback Plan
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
CHANGELOG entry